//
//  StockListController.h
//  Stock
//
//  Created by blacksun on 11-6-11.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyStock.h"
#import "NowChartViewController.h"
#import "DailyChartViewController.h"
#import "WeeklyChartViewController.h"
#import "MonthlyChartViewController.h"
#import "StockAppDelegate.h"
#import "StockContext.h"
#import "MacroDefine.h"
#import "StockAppHelper.h"
#import "MyStockStockChildListController.h"
#import "KChartViewController.h"
#import "MyStockService.h"

#define kMaxPageControlPages    9

#define kUpdateStockNotification    @"kUpdateStockNotification"

@class MyStockListController;


@interface StockListController : UIViewController<UIScrollViewDelegate>{
    UIScrollView *imageScrollView;
    UIScrollView *childScrollView;
    UIPageControl *pageControll;
    MyStockStockChildListController *childViewController;
    UIScrollView *scrollContainer;
    MyStock *myStock;
    MyStockListController *parentController;
    NSMutableArray *imageViewController;
    int currentImageIndex;
    UIImageView *leftOffsetImgaeView;
    UIImageView *rightOffsetImageView;
    NSDictionary *stockSection;
    UIView *lastedChildView;
    UIImageView *selectedImageView;
    int selectedChildIndex;
    UILabel *priceLabel;
    UILabel *changeRateLabel;
    MyStockService *myStockService;
}
@property (nonatomic, retain) NSMutableArray *imageViewController;
@property (nonatomic, assign) MyStockListController *parentController;
@property (nonatomic, retain) MyStock *myStock;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollContainer;
@property (nonatomic, retain) IBOutlet UIScrollView *imageScrollView;
@property (nonatomic, retain) IBOutlet UIScrollView *childScrollView;
@property (nonatomic, retain) IBOutlet UIPageControl *pageControll;
@property (nonatomic, retain) IBOutlet UIViewController *childViewController;
@property (nonatomic, retain) IBOutlet UIImageView *leftOffsetImgaeView;
@property (nonatomic, retain) IBOutlet UIImageView *rightOffsetImageView;
@property (nonatomic, retain) NSDictionary *stockSection;
@property (nonatomic, retain) UIView *lastedChildView;
@property (nonatomic, retain) IBOutlet UIImageView *selectedImageView;
@property (nonatomic, retain) IBOutlet UILabel *priceLabel;
@property (nonatomic, retain) IBOutlet UILabel *changeRateLabel;
@property (nonatomic, retain) MyStockService *myStockService;

-(void)didClikedStockChildSegment:(id)sender;

-(void)childViewDidUpdated:(float)viewHeight;

-(void)addToFavorite;

-(void)setUpImageViewController:(int)index;

-(void)setPageControlPageNumber:(BOOL)isPrev currentPage:(int)currentPage;

@end
